3.3.37 \(\int \frac {\tan ^5(e+f x)}{(a+b \tan ^2(e+f x))^3} \, dx\) [237]

3.3.37.1 Optimal result
3.3.37.2 Mathematica [A] (verified)
3.3.37.3 Rubi [A] (verified)
3.3.37.4 Maple [A] (verified)
3.3.37.5 Fricas [B] (verification not implemented)
3.3.37.6 Sympy [B] (verification not implemented)
3.3.37.7 Maxima [A] (verification not implemented)
3.3.37.8 Giac [B] (verification not implemented)
3.3.37.9 Mupad [B] (verification not implemented)

3.3.37.1 Optimal result

Integrand size = 23, antiderivative size = 108 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\log \left (a \cos ^2(e+f x)+b \sin ^2(e+f x)\right )}{2 (a-b)^3 f}+\frac {a^2}{4 (a-b) b^2 f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {a (a-2 b)}{2 (a-b)^2 b^2 f \left (a+b \tan ^2(e+f x)\right )} \]

output
-1/2*ln(a*cos(f*x+e)^2+b*sin(f*x+e)^2)/(a-b)^3/f+1/4*a^2/(a-b)/b^2/f/(a+b* 
tan(f*x+e)^2)^2-1/2*a*(a-2*b)/(a-b)^2/b^2/f/(a+b*tan(f*x+e)^2)
 
3.3.37.2 Mathematica [A] (verified)

Time = 1.16 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.90 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {-4 \log (\cos (e+f x))-2 \log \left (a+b \tan ^2(e+f x)\right )+\frac {a^2 (a-b)^2}{b^2 \left (a+b \tan ^2(e+f x)\right )^2}-\frac {2 a (a-2 b) (a-b)}{b^2 \left (a+b \tan ^2(e+f x)\right )}}{4 (a-b)^3 f} \]

input
Integrate[Tan[e + f*x]^5/(a + b*Tan[e + f*x]^2)^3,x]
 
output
(-4*Log[Cos[e + f*x]] - 2*Log[a + b*Tan[e + f*x]^2] + (a^2*(a - b)^2)/(b^2 
*(a + b*Tan[e + f*x]^2)^2) - (2*a*(a - 2*b)*(a - b))/(b^2*(a + b*Tan[e + f 
*x]^2)))/(4*(a - b)^3*f)
 
3.3.37.3 Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.04, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4153, 354, 99, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\tan (e+f x)^5}{\left (a+b \tan (e+f x)^2\right )^3}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle \frac {\int \frac {\tan ^5(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^3}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 354

\(\displaystyle \frac {\int \frac {\tan ^4(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^3}d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 99

\(\displaystyle \frac {\int \left (-\frac {a^2}{(a-b) b \left (b \tan ^2(e+f x)+a\right )^3}+\frac {(a-2 b) a}{(a-b)^2 b \left (b \tan ^2(e+f x)+a\right )^2}+\frac {1}{(a-b)^3 \left (\tan ^2(e+f x)+1\right )}+\frac {b}{(b-a)^3 \left (b \tan ^2(e+f x)+a\right )}\right )d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {a^2}{2 b^2 (a-b) \left (a+b \tan ^2(e+f x)\right )^2}-\frac {a (a-2 b)}{b^2 (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}+\frac {\log \left (\tan ^2(e+f x)+1\right )}{(a-b)^3}-\frac {\log \left (a+b \tan ^2(e+f x)\right )}{(a-b)^3}}{2 f}\)

input
Int[Tan[e + f*x]^5/(a + b*Tan[e + f*x]^2)^3,x]
 
output
(Log[1 + Tan[e + f*x]^2]/(a - b)^3 - Log[a + b*Tan[e + f*x]^2]/(a - b)^3 + 
 a^2/(2*(a - b)*b^2*(a + b*Tan[e + f*x]^2)^2) - (a*(a - 2*b))/((a - b)^2*b 
^2*(a + b*Tan[e + f*x]^2)))/(2*f)
 

3.3.37.3.1 Defintions of rubi rules used

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

rule 354
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S 
ymbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x 
, x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ 
[(m - 1)/2]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
3.3.37.4 Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {\frac {\frac {a^{2} \left (a^{2}-2 a b +b^{2}\right )}{2 b^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}-\ln \left (a +b \tan \left (f x +e \right )^{2}\right )-\frac {a \left (a^{2}-3 a b +2 b^{2}\right )}{b^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )}}{2 \left (a -b \right )^{3}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{3}}}{f}\) \(117\)
default \(\frac {\frac {\frac {a^{2} \left (a^{2}-2 a b +b^{2}\right )}{2 b^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}-\ln \left (a +b \tan \left (f x +e \right )^{2}\right )-\frac {a \left (a^{2}-3 a b +2 b^{2}\right )}{b^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )}}{2 \left (a -b \right )^{3}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{3}}}{f}\) \(117\)
norman \(\frac {\frac {\left (-a +3 b \right ) a^{2}}{4 b^{2} \left (a^{2}-2 a b +b^{2}\right ) f}+\frac {a \left (-a +2 b \right ) \tan \left (f x +e \right )^{2}}{2 b \left (a^{2}-2 a b +b^{2}\right ) f}}{\left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {\ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\) \(166\)
parallelrisch \(\frac {2 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right )^{4} b^{4}-2 \ln \left (a +b \tan \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right )^{4} b^{4}+4 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right )^{2} a \,b^{3}-4 \ln \left (a +b \tan \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right )^{2} a \,b^{3}-2 \tan \left (f x +e \right )^{2} a^{3} b +6 \tan \left (f x +e \right )^{2} a^{2} b^{2}-4 \tan \left (f x +e \right )^{2} a \,b^{3}+2 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a^{2} b^{2}-2 \ln \left (a +b \tan \left (f x +e \right )^{2}\right ) a^{2} b^{2}-a^{4}+4 a^{3} b -3 a^{2} b^{2}}{4 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \left (a +b \tan \left (f x +e \right )^{2}\right )^{2} b^{2} f}\) \(252\)
risch \(\frac {i x}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}+\frac {2 i e}{f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {4 a \left (a \,{\mathrm e}^{6 i \left (f x +e \right )}-b \,{\mathrm e}^{6 i \left (f x +e \right )}+a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 b \,{\mathrm e}^{4 i \left (f x +e \right )}+a \,{\mathrm e}^{2 i \left (f x +e \right )}-b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{\left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right )^{2} f \left (a -b \right )^{3}}-\frac {\ln \left ({\mathrm e}^{4 i \left (f x +e \right )}+\frac {2 \left (a +b \right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a -b}+1\right )}{2 f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\) \(257\)

input
int(tan(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x,method=_RETURNVERBOSE)
 
output
1/f*(1/2/(a-b)^3*(1/2*a^2*(a^2-2*a*b+b^2)/b^2/(a+b*tan(f*x+e)^2)^2-ln(a+b* 
tan(f*x+e)^2)-a*(a^2-3*a*b+2*b^2)/b^2/(a+b*tan(f*x+e)^2))+1/2/(a-b)^3*ln(1 
+tan(f*x+e)^2))
 
3.3.37.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 206 vs. \(2 (102) = 204\).

Time = 0.28 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.91 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {{\left (a^{2} - 4 \, a b\right )} \tan \left (f x + e\right )^{4} - 2 \, {\left (a^{2} + 2 \, a b\right )} \tan \left (f x + e\right )^{2} - 3 \, a^{2} - 2 \, {\left (b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}\right )} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right )}{4 \, {\left ({\left (a^{3} b^{2} - 3 \, a^{2} b^{3} + 3 \, a b^{4} - b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{4} b - 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} - a b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} f\right )}} \]

input
integrate(tan(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")
 
output
1/4*((a^2 - 4*a*b)*tan(f*x + e)^4 - 2*(a^2 + 2*a*b)*tan(f*x + e)^2 - 3*a^2 
 - 2*(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2 + a^2)*log((b*tan(f*x + e) 
^2 + a)/(tan(f*x + e)^2 + 1)))/((a^3*b^2 - 3*a^2*b^3 + 3*a*b^4 - b^5)*f*ta 
n(f*x + e)^4 + 2*(a^4*b - 3*a^3*b^2 + 3*a^2*b^3 - a*b^4)*f*tan(f*x + e)^2 
+ (a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*f)
 
3.3.37.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3315 vs. \(2 (87) = 174\).

Time = 72.23 (sec) , antiderivative size = 3315, normalized size of antiderivative = 30.69 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \]

input
integrate(tan(f*x+e)**5/(a+b*tan(f*x+e)**2)**3,x)
 
output
Piecewise((zoo*x/tan(e), Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), ((log(tan(e + f* 
x)**2 + 1)/(2*f) + tan(e + f*x)**4/(4*f) - tan(e + f*x)**2/(2*f))/a**3, Eq 
(b, 0)), (-3*tan(e + f*x)**4/(6*b**3*f*tan(e + f*x)**6 + 18*b**3*f*tan(e + 
 f*x)**4 + 18*b**3*f*tan(e + f*x)**2 + 6*b**3*f) - 3*tan(e + f*x)**2/(6*b* 
*3*f*tan(e + f*x)**6 + 18*b**3*f*tan(e + f*x)**4 + 18*b**3*f*tan(e + f*x)* 
*2 + 6*b**3*f) - 1/(6*b**3*f*tan(e + f*x)**6 + 18*b**3*f*tan(e + f*x)**4 + 
 18*b**3*f*tan(e + f*x)**2 + 6*b**3*f), Eq(a, b)), (x*tan(e)**5/(a + b*tan 
(e)**2)**3, Eq(f, 0)), (-a**4/(4*a**5*b**2*f + 8*a**4*b**3*f*tan(e + f*x)* 
*2 - 12*a**4*b**3*f + 4*a**3*b**4*f*tan(e + f*x)**4 - 24*a**3*b**4*f*tan(e 
 + f*x)**2 + 12*a**3*b**4*f - 12*a**2*b**5*f*tan(e + f*x)**4 + 24*a**2*b** 
5*f*tan(e + f*x)**2 - 4*a**2*b**5*f + 12*a*b**6*f*tan(e + f*x)**4 - 8*a*b* 
*6*f*tan(e + f*x)**2 - 4*b**7*f*tan(e + f*x)**4) - 2*a**3*b*tan(e + f*x)** 
2/(4*a**5*b**2*f + 8*a**4*b**3*f*tan(e + f*x)**2 - 12*a**4*b**3*f + 4*a**3 
*b**4*f*tan(e + f*x)**4 - 24*a**3*b**4*f*tan(e + f*x)**2 + 12*a**3*b**4*f 
- 12*a**2*b**5*f*tan(e + f*x)**4 + 24*a**2*b**5*f*tan(e + f*x)**2 - 4*a**2 
*b**5*f + 12*a*b**6*f*tan(e + f*x)**4 - 8*a*b**6*f*tan(e + f*x)**2 - 4*b** 
7*f*tan(e + f*x)**4) + 4*a**3*b/(4*a**5*b**2*f + 8*a**4*b**3*f*tan(e + f*x 
)**2 - 12*a**4*b**3*f + 4*a**3*b**4*f*tan(e + f*x)**4 - 24*a**3*b**4*f*tan 
(e + f*x)**2 + 12*a**3*b**4*f - 12*a**2*b**5*f*tan(e + f*x)**4 + 24*a**2*b 
**5*f*tan(e + f*x)**2 - 4*a**2*b**5*f + 12*a*b**6*f*tan(e + f*x)**4 - 8...
 
3.3.37.7 Maxima [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.75 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {\frac {4 \, {\left (a^{2} - a b\right )} \sin \left (f x + e\right )^{2} - 3 \, a^{2}}{a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3} + {\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} \sin \left (f x + e\right )^{4} - 2 \, {\left (a^{5} - 4 \, a^{4} b + 6 \, a^{3} b^{2} - 4 \, a^{2} b^{3} + a b^{4}\right )} \sin \left (f x + e\right )^{2}} - \frac {2 \, \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}}}{4 \, f} \]

input
integrate(tan(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")
 
output
1/4*((4*(a^2 - a*b)*sin(f*x + e)^2 - 3*a^2)/(a^5 - 3*a^4*b + 3*a^3*b^2 - a 
^2*b^3 + (a^5 - 5*a^4*b + 10*a^3*b^2 - 10*a^2*b^3 + 5*a*b^4 - b^5)*sin(f*x 
 + e)^4 - 2*(a^5 - 4*a^4*b + 6*a^3*b^2 - 4*a^2*b^3 + a*b^4)*sin(f*x + e)^2 
) - 2*log(-(a - b)*sin(f*x + e)^2 + a)/(a^3 - 3*a^2*b + 3*a*b^2 - b^3))/f
 
3.3.37.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 439 vs. \(2 (102) = 204\).

Time = 2.05 (sec) , antiderivative size = 439, normalized size of antiderivative = 4.06 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\frac {2 \, \log \left (a + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {4 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {4 \, \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {3 \, a^{2} + \frac {20 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {32 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {50 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {128 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {96 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {20 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {32 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}}{{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (a + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {4 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}^{2}}}{4 \, f} \]

input
integrate(tan(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")
 
output
-1/4*(2*log(a + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 4*b*(cos(f*x + 
 e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2) 
/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) - 4*log(abs(-(cos(f*x + e) - 1)/(cos(f*x 
+ e) + 1) + 1))/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) - (3*a^2 + 20*a^2*(cos(f*x 
 + e) - 1)/(cos(f*x + e) + 1) - 32*a*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 
1) + 50*a^2*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 128*a*b*(cos(f*x + 
 e) - 1)^2/(cos(f*x + e) + 1)^2 + 96*b^2*(cos(f*x + e) - 1)^2/(cos(f*x + e 
) + 1)^2 + 20*a^2*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 32*a*b*(cos( 
f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 3*a^2*(cos(f*x + e) - 1)^4/(cos(f*x 
 + e) + 1)^4)/((a^3 - 3*a^2*b + 3*a*b^2 - b^3)*(a + 2*a*(cos(f*x + e) - 1) 
/(cos(f*x + e) + 1) - 4*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f 
*x + e) - 1)^2/(cos(f*x + e) + 1)^2)^2))/f
 
3.3.37.9 Mupad [B] (verification not implemented)

Time = 11.49 (sec) , antiderivative size = 577, normalized size of antiderivative = 5.34 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {a^3\,b\,{\cos \left (e+f\,x\right )}^4-\frac {a^4\,{\cos \left (e+f\,x\right )}^4}{4}-\frac {3\,a^2\,b^2\,{\cos \left (e+f\,x\right )}^4}{4}+b^4\,{\sin \left (e+f\,x\right )}^4\,\mathrm {atan}\left (\frac {a\,{\sin \left (e+f\,x\right )}^2-b\,{\sin \left (e+f\,x\right )}^2}{a\,{\cos \left (e+f\,x\right )}^2\,2{}\mathrm {i}+a\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}+b\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}}\right )\,1{}\mathrm {i}-a\,b^3\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2-\frac {a^3\,b\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2}{2}+a^2\,b^2\,{\cos \left (e+f\,x\right )}^4\,\mathrm {atan}\left (\frac {a\,{\sin \left (e+f\,x\right )}^2-b\,{\sin \left (e+f\,x\right )}^2}{a\,{\cos \left (e+f\,x\right )}^2\,2{}\mathrm {i}+a\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}+b\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}}\right )\,1{}\mathrm {i}+\frac {3\,a^2\,b^2\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2}{2}+a\,b^3\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2\,\mathrm {atan}\left (\frac {a\,{\sin \left (e+f\,x\right )}^2-b\,{\sin \left (e+f\,x\right )}^2}{a\,{\cos \left (e+f\,x\right )}^2\,2{}\mathrm {i}+a\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}+b\,{\sin \left (e+f\,x\right )}^2\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{f\,\left (-a^5\,b^2\,{\cos \left (e+f\,x\right )}^4+3\,a^4\,b^3\,{\cos \left (e+f\,x\right )}^4-2\,a^4\,b^3\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2-3\,a^3\,b^4\,{\cos \left (e+f\,x\right )}^4+6\,a^3\,b^4\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2-a^3\,b^4\,{\sin \left (e+f\,x\right )}^4+a^2\,b^5\,{\cos \left (e+f\,x\right )}^4-6\,a^2\,b^5\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2+3\,a^2\,b^5\,{\sin \left (e+f\,x\right )}^4+2\,a\,b^6\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2-3\,a\,b^6\,{\sin \left (e+f\,x\right )}^4+b^7\,{\sin \left (e+f\,x\right )}^4\right )} \]

input
int(tan(e + f*x)^5/(a + b*tan(e + f*x)^2)^3,x)
 
output
-(a^3*b*cos(e + f*x)^4 - (a^4*cos(e + f*x)^4)/4 - (3*a^2*b^2*cos(e + f*x)^ 
4)/4 + b^4*sin(e + f*x)^4*atan((a*sin(e + f*x)^2 - b*sin(e + f*x)^2)/(a*co 
s(e + f*x)^2*2i + a*sin(e + f*x)^2*1i + b*sin(e + f*x)^2*1i))*1i - a*b^3*c 
os(e + f*x)^2*sin(e + f*x)^2 - (a^3*b*cos(e + f*x)^2*sin(e + f*x)^2)/2 + a 
^2*b^2*cos(e + f*x)^4*atan((a*sin(e + f*x)^2 - b*sin(e + f*x)^2)/(a*cos(e 
+ f*x)^2*2i + a*sin(e + f*x)^2*1i + b*sin(e + f*x)^2*1i))*1i + (3*a^2*b^2* 
cos(e + f*x)^2*sin(e + f*x)^2)/2 + a*b^3*cos(e + f*x)^2*sin(e + f*x)^2*ata 
n((a*sin(e + f*x)^2 - b*sin(e + f*x)^2)/(a*cos(e + f*x)^2*2i + a*sin(e + f 
*x)^2*1i + b*sin(e + f*x)^2*1i))*2i)/(f*(b^7*sin(e + f*x)^4 - 3*a*b^6*sin( 
e + f*x)^4 + a^2*b^5*cos(e + f*x)^4 - 3*a^3*b^4*cos(e + f*x)^4 + 3*a^4*b^3 
*cos(e + f*x)^4 - a^5*b^2*cos(e + f*x)^4 + 3*a^2*b^5*sin(e + f*x)^4 - a^3* 
b^4*sin(e + f*x)^4 + 2*a*b^6*cos(e + f*x)^2*sin(e + f*x)^2 - 6*a^2*b^5*cos 
(e + f*x)^2*sin(e + f*x)^2 + 6*a^3*b^4*cos(e + f*x)^2*sin(e + f*x)^2 - 2*a 
^4*b^3*cos(e + f*x)^2*sin(e + f*x)^2))